:root {
  /* 基础颜色变量 */
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --card-bg: white;
  --border-color: #e2e8f0;
  --primary: #1890ff;
  --primary-light: #e6f7ff;
  --secondary: #6366f1;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  
  /* 暗色模式变量 */
  --dark-bg-color: #0f172a;
  --dark-text-color: #f8fafc;
  --dark-card-bg: #1e293b;
  --dark-border-color: #334155;
  --dark-primary: #38bdf8;
  --dark-primary-light: #0c4a6e;
}

body {
  background: var(--bg-color) !important;
  color: var(--text-color);
  font-family: 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}

/* 全局动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 布局样式 */
.ant-layout {
  background: var(--bg-color) !important;
  min-height: 100vh;
}

.logo {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  margin: 0 0 0 10px;
}

.main-content {
  animation: fadeIn 0.5s ease-out;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  margin-top: 1rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 过滤器样式 */
.filters {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.filter-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-group h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-buttons button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-color);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.filter-buttons button:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.filter-buttons button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

/* 项目网格样式 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 0.5rem 0;
  animation: fadeIn 0.3s ease-out;
}

/* 项目计数样式 */
.projects-count {
  margin: 1.5rem 0;
  font-size: 1rem;
  color: var(--text-color);
  opacity: 0.8;
}

.projects-count span {
  font-weight: 600;
  color: var(--primary);
}

.dark .projects-count span {
  color: var(--dark-primary);
}

/* 项目卡片样式 */
.project-card-link {
  text-decoration: none;
  color: inherit;
}

.module-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.card-header {
  margin-bottom: 1rem;
}

.project-title {
  margin: 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.project-description {
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.5;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.project-type, .project-status {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.project-type {
  background: var(--primary-light);
  color: var(--primary);
}

.project-status {
  background: var(--gray-100);
  color: var(--text-color);
}

.tech-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Logo样式增强 */
.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.logo::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  background-color: var(--primary);
  border-radius: 6px;
}

.dark .logo::before {
  background-color: var(--dark-primary);
}

.dark .logo {
  color: var(--dark-primary);
}

/* 头部按钮样式 */
.ant-layout-header .ant-btn-text {
  color: var(--text-color);
  font-weight: 500;
  padding: 4px 15px;
  height: 32px;
  line-height: 24px;
  transition: all 0.3s;
}

.ant-layout-header .ant-btn-text:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.dark .ant-layout-header .ant-btn-text {
  color: var(--dark-text-color);
}

.dark .ant-layout-header .ant-btn-text:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--dark-primary);
}

/* 用户头像区域样式 */
.user-dropdown {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 24px;
  transition: all 0.3s;
}

.user-dropdown:hover {
  background: var(--primary-light);
}

.dark .user-dropdown:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-dropdown .username {
  margin-right: 8px;
  font-weight: 500;
}

/* 骨架屏样式优化 */
.skeleton-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  height: 280px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dark .skeleton-card {
  background: var(--dark-card-bg);
  border-color: var(--dark-border-color);
}

.skeleton-title,
.skeleton-description,
.skeleton-meta {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-title {
  height: 24px;
  width: 70%;
  margin-bottom: 16px;
}

.skeleton-description {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-meta {
  height: 20px;
  width: 40%;
  margin-top: 16px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.dark .skeleton-title,
.dark .skeleton-description,
.dark .skeleton-meta {
  background: linear-gradient(90deg, var(--dark-card-bg) 25%, rgba(255,255,255,0.05) 50%, var(--dark-card-bg) 75%);
  background-size: 200% 100%;
}

/* 暗色模式样式 */
.dark {
  --bg-color: var(--dark-bg-color);
  --text-color: var(--dark-text-color);
  --card-bg: var(--dark-card-bg);
  --border-color: var(--dark-border-color);
}

.dark .module-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dark .project-type {
  background: var(--dark-primary-light);
  color: var(--dark-primary);
}

.dark .project-status {
  background: rgba(255, 255, 255, 0.1);
  color: var(--dark-text-color);
}

.dark .filter-buttons button.active {
  background: var(--dark-primary);
  border-color: var(--dark-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .filter-container {
    gap: 0.75rem;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 任务项分隔线 */
.task-divider {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 2px 0;
}

/* 已完成状态样式 */
.task-status.completed {
  color: #52c41a;
  background: #f6ffed;
  border-color: #b7eb8f;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 20px;
}

/* 进度容器优化 */
.progress-container {
  margin: 12px 0;
  position: relative;
  height: 24px;
}

/* 任务项间距调整 */
.task-item {
  padding: 16px 0;
  margin-bottom: 10px;
  margin-top: 10px;
}

.task-meta{
  margin-top: 10px;
}

/* 滚动条美化 */
.task-section::-webkit-scrollbar {
  width: 8px;
  background-color: var(--card-bg);
}

.task-section::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
}

.tech-icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tech-icon {
  font-size: 1.2rem;
  opacity: 0.9;
}

.tech-icon:hover {
  transform: scale(1.15);
  color: var(--primary-color);
}

.dark .tech-icon {
  color: var(--dark-text-color);
}

.projects-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding: 1rem 0;
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.module-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 1.5rem;
}

.project-card-link {
  transition: transform 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.project-card-link:hover {
  transform: translateY(-3px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-description {
  flex-grow: 1;
  margin: 0.8rem 0;
}

/* 登录页样式 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-box {
  background: white;
  padding: 2rem 3rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  color: #000;
  max-width: 400px;
}

.form-group input {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  border: 1px solid #ddd;
  color: #000;
  border-radius: 4px;
}

.login-btn {
  width: 100%;
  padding: 1rem;
  background: #1890ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.social-login {
  margin-top: 2rem;
  text-align: center;
}

.qrcode-wrapper {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 安卓特定优化 */
@supports (-webkit-overflow-scrolling: touch) {
  .scrollable-area {
    -webkit-overflow-scrolling: touch;
  }
}

.verification-code-container {
  position: relative;
  width: 100%;
}

.verification-code-input {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.verification-code-text {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #007bff;
  font-size: 0.9rem;
  cursor: pointer;
}

.ant-layout-header {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  height: 64px;
  line-height: 64px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.logo {
  font-size: 18px;
  font-weight: 600;
  color: #1890ff;
}

/* 项目详情页样式 */
.project-detail {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
}

.base-info {
  padding: 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.info-modules {
  flex: 1;
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  grid-template-rows: minmax(0, 1fr); /* 关键修正点 */
  height: calc(100vh - 128px); /* 128px=头部64px+底部间距 */
  gap: 24px;
  padding: 24px;
  overflow: hidden;
  
}

/* 左侧列（上下布局） */
.left-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

/* 中间任务跟踪区域 */
.task-section {
  height: 100%;
  overflow: hidden auto; /* 双向滚动控制 */
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
}

/* 右侧技术组件区域 */
.tech-section {
  height: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  overflow-y: auto;
}

/* 配置详情和版本历史模块 */
/* .config-section, */
.version-section {
  flex: 1;
  min-height: 300px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  overflow-y: auto;
}

.version-section {
  height: 200px !important;
  min-height: auto !important;
  overflow-y: auto;
}

.task-section:not(.version-section),
.tech-section:not(.version-section) {
  height: auto !important;
}

/* 版本发布历史模块 */
.section-module:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

/* 任务进度跟踪模块（中间宽列） */
.section-module:nth-child(2) {
  grid-column: 2;
  grid-row: 1 / 3; /* 跨两行高度 */
  min-height: 500px;
}

/* 技术组件清单模块 */
.section-module:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

/* 项目配置详情模块（单独第二行） */
.section-module:nth-child(4) {
  grid-column: 1;
  grid-row: 1;
}

.section-module {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  height: 100%;
  /* min-height: 200px; */
}

.module-card {
  height: 100%;
  min-height: 200px;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.module-header {
  border-bottom: 2px solid #f0f2f5;
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.module-title {
  font-size: 18px;
  color: #1a1a1a;
  font-weight: 600;
}

.config-table {
  width: 100%;
  border-collapse: collapse;
}

.config-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.config-table tr:last-child td {
  border-bottom: none;
}

/* 项目配置详情模块样式 */
.config-section {
  height: 350px;
  overflow: visible;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-content: start; /* 顶部对齐 */
}
/* @media (max-width: 768px) {
  .config-section {
    grid-column: 1 / -1; 
  }
} */
.config-content > * {
  max-width: 100%;
  overflow-wrap: break-word;
}
/* 折叠面板样式 */
.collapse-panel {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  margin: 8px 0;
}

.collapse-header {
  padding: 12px;
  background: #f8f9fa;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapse-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.collapse-content.open {
  max-height: 500px;
  padding: 12px;
}

/* 技术徽章 */
.tech-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  margin: 4px;
  font-size: 0.85em;
}

.platform-badge { background: #e3f2fd; color: #1976d2; }
.sdk-badge { background: #f0f4c3; color: #827717; }
.framework-badge { background: #ffcdd2; color: #c62828; }

/* 进度条 */
.progress-container {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: #4CAF50;
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  color: #666;
}

/* 版本历史样式 */
.version-history {
  margin: 24px 0;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  height:20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.version-card {
  padding: 12px;
  border-left: 3px solid #1890ff;
}

.version-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.highlights li {
  list-style-type: circle;
  margin-left: 20px;
  color: #666;
}

* {
  transition: 
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

.theme-button {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  padding: 0.35rem 0.8rem;
  height: 32px;
  line-height: 1;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
}

.dark .filter-buttons button:not(.active) {
  background: #334155;
  color: #e2e8f0;
}

.project-detail-container {
  margin: 0;
  padding: 0;
  width: 100%;
}

/* 暗黑模式适配 */
.dark .timelineContent {
  background: var(--dark-card-bg);
  border: 1px solid var(--dark-border-color);
}

.dark .timelineDot {
  border-color: var(--dark-card-bg);
}

/* 任务管理页面样式 */
.task-management-page {
  background-color: var(--bg-color);
  padding: 24px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.task-management-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.task-management-page .ant-table-wrapper {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.task-management-page .ant-table-thead > tr > th {
  background-color: var(--table-header-bg);
  color: var(--text-color);
  font-weight: 600;
}

.task-management-page .ant-form-item-label > label {
  color: var(--text-color);
}

.task-management-page .ql-editor {
  min-height: 150px;
  background-color: var(--input-bg);
}

.task-management-page .ql-container {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.task-management-page .ql-toolbar {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  background-color: var(--input-bg);
}

/* 暗黑模式下的任务管理页面样式 */
.dark .task-management-page .ant-table-thead > tr > th {
  background-color: var(--dark-table-header-bg);
  color: var(--dark-text-color);
}

.dark .task-management-page .ant-table {
  background-color: var(--dark-card-bg);
  color: var(--dark-text-color);
}

.dark .task-management-page .ant-table-tbody > tr > td {
  border-bottom: 1px solid var(--dark-border-color);
}

.dark .task-management-page .ql-toolbar,
.dark .task-management-page .ql-container,
.dark .task-management-page .ql-editor {
  background-color: var(--dark-input-bg);
  color: var(--dark-text-color);
  border-color: var(--dark-border-color);
}

.dark .task-management-page .ql-toolbar .ql-stroke {
  stroke: var(--dark-text-color);
}

.dark .task-management-page .ql-toolbar .ql-fill {
  fill: var(--dark-text-color);
}
/* 暗黑模式下的表格样式调整 */
.dark .task-management-page .ant-table {
  background-color: var(--dark-card-bg);
  color: var(--dark-text-color);
}

.dark .task-management-page .ant-table-thead > tr > th {
  background-color: #334155;
  color: var(--dark-text-color);
}

.dark .task-management-page .ant-table-tbody > tr > td {
  border-bottom: 1px solid var(--dark-border-color);
  color: var(--dark-text-color);
}

.dark .task-management-page .ant-table-tbody > tr:hover > td {
  background-color: #2c3e50 !important;
}

.dark .task-management-page .ant-pagination-item,
.dark .task-management-page .ant-pagination-item-link,
.dark .task-management-page .ant-pagination-item-ellipsis {
  color: var(--dark-text-color);
  background-color: var(--dark-card-bg);
}

.dark .task-management-page .ant-pagination-item-active {
  border-color: var(--dark-primary);
}

.dark .task-management-page .ant-pagination-item-active a {
  color: var(--dark-primary);
}

.dark .task-management-page .ant-progress-text {
  color: var(--dark-text-color);
}

.dark .task-management-page .ant-pagination-total-text {
  color: var(--dark-text-color);
}

/* 修复暗黑模式下项目名称和操作列的背景问题 */
.dark .task-management-page .ant-table-cell {
  background-color: var(--dark-card-bg) !important;
  color: var(--dark-text-color) !important;
}

.dark .task-management-page .ant-table-row-hover .ant-table-cell {
  background-color: #2c3e50 !important;
}

.dark .task-management-page .ant-btn-text {
  color: var(--dark-text-color);
}

.dark .task-management-page .ant-btn-text:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.dark .task-management-page .ant-btn-link {
  color: var(--dark-primary);
}

.dark .task-management-page .ant-popover-inner {
  background-color: var(--dark-card-bg);
}

.dark .task-management-page .ant-popover-title,
.dark .task-management-page .ant-popover-inner-content {
  color: var(--dark-text-color);
}

.new-task-input {
  width: 300px;
}

/* 自定义表格样式 - 使表头和单元格文字居中 */
.custom-table .ant-table-thead > tr > th {
  text-align: center !important;
}

.custom-table .ant-table-tbody > tr > td {
  text-align: center !important;
}
